{include file="public/header" /}
<form class="layui-form">
	<input type="hidden" name="uid" value="{$lists.uid}">
	<div class="layui-form-item">
		<label class="layui-form-label">账户</label>
		<div class="layui-input-inline"><input type="text" class="layui-input" value="{$lists.account}" readonly></div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">姓&nbsp;&nbsp;&nbsp;&nbsp;名</label>
		<div class="layui-input-inline">
			<input type="text" class="layui-input" name="name" placeholder="请输入真实姓名" value="{$lists.name}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">手机号</label>
		<div class="layui-input-inline">
			<input type="text" class="layui-input" name="mobile" placeholder="请输入手机号" value="{$lists.mobile}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">QQ号</label>
		<div class="layui-input-inline">
			<input type="text" class="layui-input" name="qq" placeholder="请输入QQ号" value="{$lists.qq}">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">部门</label>
		<div class="layui-input-inline">
			<select name="group_id">
				<option value=0></option>
				{volist name="group" id="vo"}
					<option value="{$vo.group_id}" {$vo.group_id == $lists.group_id ? 'selected' : ''}>{$vo.group_name}</option>
				{/volist}
			</select>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">性别</label>
		<div class="layui-input-block">
			<input type="radio" name="sex" value="1" title="男" {$lists.sex==1?'checked':''}>
			<input type="radio" name="sex" value="2" title="女" {$lists.sex==2?'checked':''}>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">状态</label>
		<div class="layui-input-block">
			<input type="radio" name="status" value="1" title="开启" {$lists.status==1?'checked':''}>
			<input type="radio" name="status" value="0" title="禁用" {$lists.status==0?'checked':''}>
		</div>
	</div>
</form>
<div class="layui-form-item">
	<div class="layui-input-block">
		<button class="layui-btn" onclick="save()">保存</button>
	</div>
</div>
<script type="text/javascript">
	layui.use(['layer','form'],function(){
		form = layui.form;
		layer = layui.layer;
		$ = layui.jquery;
	});
	// 保存管理员
	function save(){
		$.post("{$config['admin_route']}bewadmin/useredit",$('form').serialize(),function(res){
			if(res.code>0){
				layer.alert(res.msg,{icon:2});
			}else{
				layer.msg(res.msg);
				setTimeout(function(){parent.window.location.reload();},1000);
			}
		},'json');
	}
</script>
{include file="public/tail" /}